<template>
	<div>
		<el-card style="width: 800px;">
			<div id="myChart" :style="{width: '800px', height: '400px'}"></div>
		</el-card>
	</div>
</template>

<script>
	import {
		setup
	} from "@/common/lang/index.js";
	
	
import pre from "@/common/pre.js";

const Pre =new pre(1,2);
var ccc=function (){
				var b=1;
				return {
					get(){
						b++
						return b;
					},
					
				};
			}();

	export default {
		data() {
			return {
				arr: [{
					nameEnUs: "color",
					nameZhCn: "颜色",
					titleEnUs: "title",
					titleZhCn: "辩题"
				}],
				titleArr:['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
			}

		},
		mounted() {
			let play= Pre.play().play2()
			console.log(play)
			this.drawLine();
		},
		methods: {
			aaa(){
				console.log(ccc.get())
				
			},
			
			
			
			
			drawLine() {
				let _this = this
				// 基于准备好的dom，初始化echarts实例
				let myChart = this.$echarts.init(document.getElementById('myChart'))
				
				// 绘制图表
				myChart.setOption({
					title: {
						text: '成交统计'
					},
					xAxis: {
						type: 'category',
						boundaryGap: false,
						data: _this.titleArr,
					},
					yAxis: {
						type: 'value'
					},
					series: [{
						data: [150, 230, 224, 218, 135, 147, 260],
						type: 'line',
						areaStyle: {}
					}],

				});
			},

		}

	}
</script>

<style>
</style>
